/**
 * 
 */
package com.sandberg.shopper.core;

import java.math.BigDecimal;

/**
 * @author Jesper
 *
 */
public class Utility {

	/**
	 * @param number the decimal number to round.
	 * @return a String representing {@link}number with 2 decimals.
	 */
	public static String round2digits(float number) {
		BigDecimal result = new BigDecimal(number);
		result = result.setScale (2, BigDecimal.ROUND_HALF_UP);
		return result.toString();
	}
}
